<html>
	<head>
		<meta charset="utf-8"></meta>
		<title>BXmlNode</title>
		<link href="./style.css" rel="stylesheet" type="text/css"/>
	</head>
	<body>
		<h1>BXmlNode</h1>
		<p>Inherites from <a href="BObject.html">BObject</a></p>
		<p id="resume"></p>
		<h2>public</h2>
		<table id="public"><tr><td align="right"></td><td><a href="#BXmlNode(BXmlNode*)">BXmlNode</a>(BXmlNode* parent = 0);</td></tr>
			<tr><td align="right"></td><td><a href="#BXmlNode(const BString&,BXmlNode*)">BXmlNode</a>(const BString& name, BXmlNode* parent = 0);</td></tr>
			<tr><td align="right"></td><td><a href="#~BXmlNode()">~BXmlNode</a>();</td></tr>
			<tr><td align="right">bool </td><td><a href="#empty()">empty</a>() const;</td></tr>
			<tr><td align="right">virtual bool </td><td><a href="#setFormat(const BString&)">setFormat</a>(const BString& format);</td></tr>
			<tr><td align="right">const BString& </td><td><a href="#format()">format</a>() const;</td></tr>
			<tr><td align="right">virtual bool </td><td><a href="#setText(const BString&)">setText</a>(const BString& text);</td></tr>
			<tr><td align="right">const BString& </td><td><a href="#text()">text</a>() const;</td></tr>
			<tr><td align="right">void </td><td><a href="#appendText(const BString&)">appendText</a>(const BString& text);</td></tr>
			<tr><td align="right">void </td><td><a href="#prependText(const BString&)">prependText</a>(const BString& text);</td></tr>
			<tr><td align="right">virtual bool </td><td><a href="#setAttrib(const BString&, const BString&)">setAttrib</a>(const BString& name, const BString& value);</td></tr>
			<tr><td align="right">const BString& </td><td><a href="#attrib(const BString&)">attrib</a>(const BString& name) const;</td></tr>
			<tr><td align="right">bool </td><td><a href="#hasAttrib(const BString&)">hasAttrib</a>(const BString& name) const;</td></tr>
			<tr><td align="right">void </td><td><a href="#setAttribSet(const, BString>&)">setAttribSet</a>(const BMap&ltBString, BString&gt& attribSet);</td></tr>
			<tr><td align="right">const BMap<BString, BString>& </td><td><a href="#attribSet()">attribSet</a>() const;</td></tr>
			<tr><td align="right">bool </td><td><a href="#removeAttrib(const BString&)">removeAttrib</a>(const BString& name);</td></tr>
			<tr><td align="right">void </td><td><a href="#clearAttribs()">clearAttribs</a>();</td></tr>
			<tr><td align="right">const BXmlNode* </td><td><a href="#root()">root</a>() const;</td></tr>
			<tr><td align="right">BXmlNode* </td><td><a href="#root()">root</a>();</td></tr>
			<tr><td align="right">void </td><td><a href="#setParent(BXmlNode*)">setParent</a>(BXmlNode* parent);</td></tr>
			<tr><td align="right">BXmlNode* </td><td><a href="#parent()">parent</a>();</td></tr>
			<tr><td align="right">const BXmlNode* </td><td><a href="#parent()">parent</a>() const;</td></tr>
			<tr><td align="right">BXmlNode* </td><td><a href="#parent(const BString&)">parent</a>(const BString& name);</td></tr>
			<tr><td align="right">const BXmlNode* </td><td><a href="#parent(const BString&)">parent</a>(const BString& name) const;</td></tr>
			<tr><td align="right">BXmlNode* </td><td><a href="#addText(const BString&)">addText</a>(const BString& text);</td></tr>
			<tr><td align="right">BXmlNode* </td><td><a href="#addChild(const BString&,const BString&)">addChild</a>(const BString& name, const BString& text = BString());</td></tr>
			<tr><td align="right">bool </td><td><a href="#addChild(BXmlNode*)">addChild</a>(BXmlNode* child);</td></tr>
			<tr><td align="right">bool </td><td><a href="#setChild(int, BXmlNode*)">setChild</a>(int pos, BXmlNode* child);</td></tr>
			<tr><td align="right">bool </td><td><a href="#insertChild(int, BXmlNode*)">insertChild</a>(int pos, BXmlNode* child);</td></tr>
			<tr><td align="right">bool </td><td><a href="#removeChild(const BXmlNode*)">removeChild</a>(const BXmlNode* node);</td></tr>
			<tr><td align="right">int </td><td><a href="#childCount()">childCount</a>() const;</td></tr>
			<tr><td align="right">BXmlNode* </td><td><a href="#child(int)">child</a>(int index);</td></tr>
			<tr><td align="right">const BXmlNode* </td><td><a href="#child(int)">child</a>(int index) const;</td></tr>
			<tr><td align="right">BXmlNode* </td><td><a href="#child(const BString&)">child</a>(const BString& desc);</td></tr>
			<tr><td align="right">const BXmlNode* </td><td><a href="#child(const BString&)">child</a>(const BString& desc) const;</td></tr>
			<tr><td align="right">BXmlNode* </td><td><a href="#find(const BString&)">find</a>(const BString& desc);</td></tr>
			<tr><td align="right">const BXmlNode* </td><td><a href="#find(const BString&)">find</a>(const BString& desc) const;</td></tr>
			<tr><td align="right">int </td><td><a href="#level()">level</a>() const;</td></tr>
			<tr><td align="right">int </td><td><a href="#index()">index</a>() const;</td></tr>
			<tr><td align="right">BXmlNode* </td><td><a href="#prev()">prev</a>();</td></tr>
			<tr><td align="right">BXmlNode* </td><td><a href="#next()">next</a>();</td></tr>
			<tr><td align="right">bool </td><td><a href="#above(const BXmlNode*)">above</a>(const BXmlNode* node) const;</td></tr>
			<tr><td align="right">bool </td><td><a href="#under(const BXmlNode*)">under</a>(const BXmlNode* node) const;</td></tr>
			<tr><td align="right">bool </td><td><a href="#contain(const BXmlNode*)">contain</a>(const BXmlNode* node) const;</td></tr>
			<tr><td align="right">void </td><td><a href="#remove(BXmlNode*)">remove</a>(BXmlNode* child);</td></tr>
			<tr><td align="right">void </td><td><a href="#remove(const BString&)">remove</a>(const BString& desc);</td></tr>
			<tr><td align="right">void </td><td><a href="#clear()">clear</a>();</td></tr>
			<tr><td align="right">const BString& </td><td><a href="#plainText()">plainText</a>() const;</td></tr>
			<tr><td align="right">BXmlNode* </td><td><a href="#locate(const BString&)">locate</a>(const BString& desc);</td></tr>
			<tr><td align="right">const BXmlNode* </td><td><a href="#locate(const BString&)">locate</a>(const BString& desc) const;</td></tr>
			<tr><td align="right">BString </td><td><a href="#path(const char*)">path</a>(const char* split = "/") const;</td></tr>
			<tr><td align="right">BString </td><td><a href="#path(const BString&)">path</a>(const BString& split) const;</td></tr>
			<tr><td align="right">BString </td><td><a href="#pathTo(const BXmlNode*,const char*)">pathTo</a>(const BXmlNode* parent, const char* split = "/") const;</td></tr>
			<tr><td align="right">BString </td><td><a href="#pathTo(const BXmlNode*, const BString&)">pathTo</a>(const BXmlNode* parent, const BString& split) const;</td></tr>
		</table>
		<div id="desc">
			<h2>Detailed Description : </h2>
			<p>BXmlNode is node of xml tree. It has one parent and several children. xml node has Attribs, text and format.If node name is empty means it is a text node. If node name is '!' means it is a comment node.The format string will be used when node is written to string, eg: "\n<>\n</>\n" means before node head line break, after node head line break, before node tail print line break and after node tail print line break. </p>
			<p>When you have a xml node you can seek the parent node and brother node use prev() or next(). You can find lower level node by descript text, eg : "zym:id=top@index#shit" means find the node name is "zym" and text include "index" unclude "shit".</p>
			<p>BXmlDocument can read from string to load xml node tree.</p>
		</div>
		<h2 id="docs">Member Documentation</h2>
		<div id="BXmlNode(BXmlNode*)">
			<h3>BXmlNode(BXmlNode* parent = 0);</h3>
			<p>Constructs xml node with parent.</p>
		</div>
		<div id="BXmlNode(const BString&,BXmlNode*)">
			<h3>BXmlNode(const BString& name, BXmlNode* parent = 0);</h3>
			<p>Constructs xml node with name and parent.</p>
		</div>
		<div id="~BXmlNode()">
			<h3>~BXmlNode();</h3>
			<p>Destroys xml node.</p>
		</div>
		<div id="empty()">
			<h3>bool empty() const;</h3>
			<p>Return if node is empty. Empty node means it has no child, no attrib, and text is empty.</p>
		</div>
		<div id="setFormat(const BString&)">
			<h3>virtual bool setFormat(const BString& format);</h3>
			<p>Set format of node, the format will effect how to write node to text.</p>
		</div>
		<div id="format()">
			<h3>const BString& format() const;</h3>
			<p>Get format of node.</p>
		</div>
		<div id="setText(const BString&)">
			<h3>virtual bool setText(const BString& text);</h3>
		</div>
		<div id="text()">
			<h3>const BString& text() const;</h3>
		</div>
		<div id="appendText(const BString&)">
			<h3>void appendText(const BString& text);</h3>
		</div>
		<div id="prependText(const BString&)">
			<h3>void prependText(const BString& text);</h3>
		</div>
		<div id="setAttrib(const BString&, const BString&)">
			<h3>virtual bool setAttrib(const BString& name, const BString& value);</h3>
		</div>
		<div id="attrib(const BString&)">
			<h3>const BString& attrib(const BString& name) const;</h3>
		</div>
		<div id="hasAttrib(const BString&)">
			<h3>bool hasAttrib(const BString& name) const;</h3>
			<p>Return if node has a attrib of the name.</p>
		</div>
		<div id="setAttribSet(const, BString>&)">
			<h3>void setAttribSet(const BMap&ltBString, BString&gt& attribSet);</h3>
		</div>
		<div id="attribSet()">
			<h3>const BMap<BString, BString>& attribSet() const;</h3>
		</div>
		<div id="removeAttrib(const BString&)">
			<h3>bool removeAttrib(const BString& name);</h3>
			<p>Remove node's attrib of name.</p>
		</div>
		<div id="clearAttribs()">
			<h3>void clearAttribs();</h3>
		</div>
		<div id="root()">
			<h3>const BXmlNode* root() const;</h3>
			<p>Get the root node of this one.</p>
		</div>
		<div id="root()">
			<h3>BXmlNode* root();</h3>
		</div>
		<div id="setParent(BXmlNode*)">
			<h3>void setParent(BXmlNode* parent);</h3>
		</div>
		<div id="parent()">
			<h3>BXmlNode* parent();</h3>
		</div>
		<div id="parent()">
			<h3>const BXmlNode* parent() const;</h3>
		</div>
		<div id="parent(const BString&)">
			<h3>BXmlNode* parent(const BString& name);</h3>
		</div>
		<div id="parent(const BString&)">
			<h3>const BXmlNode* parent(const BString& name) const;</h3>
		</div>
		<div id="addText(const BString&)">
			<h3>BXmlNode* addText(const BString& text);</h3>
		</div>
		<div id="addChild(const BString&,const BString&)">
			<h3>BXmlNode* addChild(const BString& name, const BString& text = BString());</h3>
		</div>
		<div id="addChild(BXmlNode*)">
			<h3>bool addChild(BXmlNode* child);</h3>
			<p>Append a child node.</p>
		</div>
		<div id="setChild(int, BXmlNode*)">
			<h3>bool setChild(int pos, BXmlNode* child);</h3>
		</div>
		<div id="insertChild(int, BXmlNode*)">
			<h3>bool insertChild(int pos, BXmlNode* child);</h3>
		</div>
		<div id="removeChild(const BXmlNode*)">
			<h3>bool removeChild(const BXmlNode* node);</h3>
		</div>
		<div id="childCount()">
			<h3>int childCount() const;</h3>
			<p>Return number of children.</p>
		</div>
		<div id="child(int)">
			<h3>BXmlNode* child(int index);</h3>
		</div>
		<div id="child(int)">
			<h3>const BXmlNode* child(int index) const;</h3>
		</div>
		<div id="child(const BString&)">
			<h3>BXmlNode* child(const BString& desc);</h3>
			<p>Find child matchs the desc text.The desc text only describes one node.</p>
		</div>
		<div id="child(const BString&)">
			<h3>const BXmlNode* child(const BString& desc) const;</h3>
		</div>
		<div id="find(const BString&)">
			<h3>BXmlNode* find(const BString& desc);</h3>
			<p>Find lower node macths the desc text.The desc only describes one node.</p>
		</div>
		<div id="find(const BString&)">
			<h3>const BXmlNode* find(const BString& desc) const;</h3>
		</div>
		<div id="level()">
			<h3>int level() const;</h3>
		</div>
		<div id="index()">
			<h3>int index() const;</h3>
			<p>Return node's index in parent children list.</p>
		</div>
		<div id="prev()">
			<h3>BXmlNode* prev();</h3>
			<p>Return the brother node before this one.</p>
		</div>
		<div id="next()">
			<h3>BXmlNode* next();</h3>
			<p>Return the brother node after this one.</p>
		</div>
		<div id="above(const BXmlNode*)">
			<h3>bool above(const BXmlNode* node) const;</h3>
		</div>
		<div id="under(const BXmlNode*)">
			<h3>bool under(const BXmlNode* node) const;</h3>
		</div>
		<div id="contain(const BXmlNode*)">
			<h3>bool contain(const BXmlNode* node) const;</h3>
		</div>
		<div id="remove(BXmlNode*)">
			<h3>void remove(BXmlNode* child);</h3>
		</div>
		<div id="remove(const BString&)">
			<h3>void remove(const BString& desc);</h3>
			<p>Remove child which matchs the desc text.</p>
		</div>
		<div id="clear()">
			<h3>void clear();</h3>
			<p>Remove all attribs and all children.</p>
		</div>
		<div id="plainText()">
			<h3>const BString& plainText() const;</h3>
			<p>Returns the text of the text edit as plain text.</p>
		</div>
		<div id="locate(const BString&)">
			<h3>BXmlNode* locate(const BString& desc);</h3>
			<p>Find node matchs the desc text, the desc is layered by '/',each level find each node's children.Eg: "body/div:id=#123/p:id=title" means find node named "body", if success then try to find node which's name is "div" and attrib "id" is "123" in body node, if still success then find node which's name is "id" and attrib "id" is "title" in div node.</p>
		</div>
		<div id="locate(const BString&)">
			<h3>const BXmlNode* locate(const BString& desc) const;</h3>
		</div>
		<div id="path(const char*)">
			<h3>BString path(const char* split = "/") const;</h3>
		</div>
		<div id="path(const BString&)">
			<h3>BString path(const BString& split) const;</h3>
		</div>
		<div id="pathTo(const BXmlNode*,const char*)">
			<h3>BString pathTo(const BXmlNode* parent, const char* split = "/") const;</h3>
		</div>
		<div id="pathTo(const BXmlNode*, const BString&)">
			<h3>BString pathTo(const BXmlNode* parent, const BString& split) const;</h3>
		</div>
	</body>
</html>